package com.eddie.libray;

import com.eddie.libray.reception.AbstractReception;
import com.eddie.libray.reception.AdminReception;
import com.eddie.libray.reception.MainReception;
import com.eddie.libray.reception.UserReception;
import com.eddie.libray.service.AdminService;

/**
 * 图书馆应用
 *
 * @author Eddie
 * @since 2022/09/02 10:24
 **/
public class LibraryApp {

    /**
     * 初始化几种接收器状态
     */
    private final MainReception mainReception = new MainReception(this);

    private final AdminReception adminReception = new AdminReception(this);

    private final UserReception userReception = new UserReception(this);


    /**
     * 初始化接收器状态为主菜单状态
     */
    private AbstractReception receptionState = mainReception;

    public void start() {
        while (receptionState != null) {
            receptionState.start();
        }
        System.out.println("您已退出");
    }


    public void setReceptionState(AbstractReception receptionState) {
        this.receptionState = receptionState;
    }

    public MainReception getMainReception() {
        return mainReception;
    }

    public AdminReception getAdminReception() {
        return adminReception;
    }

    public UserReception getUserReception() {
        return userReception;
    }
}
